import type { VNode, ComponentInternalInstance } from 'vue'
export interface MessageProps {
    message?: string; // 提示内容 
    duration?: number; // 时长
    showClose?: boolean; // 控制关闭按钮是否登录
    type?: 'success' | 'warning' | 'message' | 'error',
    onDestroy: () => void;
    offset?: number,
    id: string
}

export type CreateMessageProps = Omit<MessageProps, 'onDestroy' | 'id'>

// 组件实例
export interface MessageContext {
    id: string; // 辨别不同的实例
    vnode: VNode;
    props: MessageProps,
    vm: ComponentInternalInstance // vue实例
}